﻿
Imports Microsoft.Office.Interop.Outlook

Namespace UI
    Public Class pmSearchFolderForm
        Inherits PMOutlookAddIn.UI.pmBaseFolderTreeForm

        Public Sub New(ByVal App As Application)
            MyBase.New(App)
            InitializeComponent()
            btnDoAction.Text = "Ga naar map"
        End Sub

#Region "Private methods"
        Private Sub pmSearchFolderForm_ActionButtonClicked() Handles Me.ActionButtonClicked
            Dim destinationFolder As Outlook.MAPIFolder = _pmFoldertree.GetSelectedFolder()

            If IsNothing(destinationFolder) Then
                Return
            End If
            SharedMethods.SetCurrentFolder(_app, destinationFolder)
            Me.Close()
        End Sub
#End Region

        Public Overrides Sub pmForm_Shown(ByVal sender As Object, ByVal e As System.EventArgs)
            SelectRelevantFolder(String.Empty)
            SharedMethods.ControlSetFocus(txtSearchBox)
        End Sub

      
    End Class
End Namespace